import java.net.Socket;
import external.*;




public class MessageProcessor {
	public static void ProcessMessage(Socket socket, Message message)
	{
		switch(message.type)
		{
		case JoinRoom:
			Players.AssignPlayerToRoom(socket, (Integer)message.messageInfo+1);
			break;
//		case Road:
//			break;
//		case ViewRooms:
//			Message sendMessage = new Message(Message.Type.ViewRooms,Players.NumberOfPlayersInRooms());
//			SocketWriter.SendMessage(sendMessage, socket);
//			break;
//		case playersStates:
//			break;
		case selfState:
			Players.ModifyPlayerState(socket, (Player)message.messageInfo);
			break;
		default:
			break;
		
		}
	}
}
